package com.lyf.shop.domain;

import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.lyf.common.core.annotation.Excel;
import com.lyf.common.core.web.domain.BaseEntity;
import org.apache.poi.hpsf.Decimal;

import java.math.BigDecimal;

/**
 * 订单对象 t_order
 * 
 * @author lyf
 * @date 2023-03-22
 */
@Data
public class Order extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long orderId;

    /** 超市id */
    @Excel(name = "超市id")
    private Long supermarketId;

    private String supermarketName;
    /** 商户订单号*/
    @Excel(name = "商户订单号")
    private String outTradeNo;

    /** 支付宝交易号 */
    @Excel(name = "支付宝交易号")
    private String tradeNo;

    /** 支付宝交易号 */
    @Excel(name = "商品id")
    private String commodityName;
    /** 交易状态（0：成功 1：失败） */
    @Excel(name = "交易状态", readConverterExp = "0=：成功,1=：失败，2 = 未支付")
    private String status;

    /** 订单商品数量 */
    @Excel(name = "订单商品数量")
    private Long orderNum;


    /** 交易金额 */
    @Excel(name = "交易金额")
    private BigDecimal amount;

    /** 交易金额 */
    @Excel(name = "会员id")
    private Long NumberId;

     private String integralStatus;
    /**
     * 会员账号
     */
    private  String account;

    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setSupermarketId(Long supermarketId) 
    {
        this.supermarketId = supermarketId;
    }

    public Long getSupermarketId() 
    {
        return supermarketId;
    }
    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public void setOrderNum(Long orderNum) 
    {
        this.orderNum = orderNum;
    }

    public Long getOrderNum() 
    {
        return orderNum;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getOutTradeNo() {
        return outTradeNo;
    }

    public void setOutTradeNo(String outTradeNo) {
        this.outTradeNo = outTradeNo;
    }

    public String getTradeNo() {
        return tradeNo;
    }

    public void setTradeNo(String tradeNo) {
        this.tradeNo = tradeNo;
    }

    public String getCommodityName() {
        return commodityName;
    }

    public void setCommodityName(String commodityName) {
        this.commodityName = commodityName;
    }

    public String getSupermarketName() {
        return supermarketName;
    }

    public void setSupermarketName(String supermarketName) {
        this.supermarketName = supermarketName;
    }

    public Long getNumberId() {
        return NumberId;
    }

    public void setNumberId(Long numberId) {
        NumberId = numberId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("supermarketId", getSupermarketId())
            .append("status", getStatus())
            .append("orderNum", getOrderNum())
            .append("amount", getAmount())
            .append("createTime", getCreateTime())
            .append("createBy", getCreateBy())
            .append("updateTime", getUpdateTime())
            .append("tradeNo",getTradeNo())
                .append("outTradeNo",getOutTradeNo())
                .append("commodityName",getCommodityName())
                .append("supermarketName",getSupermarketName())
                .append("numberId" ,getNumberId())
                .append("account",getAccount())
                .append("integralStatus",getIntegralStatus())
            .toString();
    }
}
